package com.yy.string_;

/**
 * chapter13  com.yy.string_
 * 2023-05-09 10:52
 *
 * @author yy yuyue
 * description : 不可描述
 * @date 2023/5/9 10:52
 */
public class StringExercise05 {
    public static void main(String[] args) {
        Person p1 = new Person();
        p1.name = "yy";
        Person p2 = new Person();
        p2.name = "yy";


        System.out.println(p1.name.equals(p2.name));//比较内容: True
        System.out.println(p1.name == p2.name);// True
        System.out.println(p1.name == "yy");// True

        String s1 = new String("bcad");
        String s2 = new String("bcad");
        System.out.println(s1 == s2);//F

    }
}

//因为属性这样访问, 所以是
class Person{
    public String name;
}
